Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Made changes with OutParam::OCCICLOB bacause of problems with output cirillic chars #173

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

piraman
Copy link

@piraman piraman commented Apr 18, 2014

I found a problem with output data with cyrillic chars from oracle. When output was large size (over ~2000 chars) i got unrecognized chars in clob. The settings are: NLS_LANG=.UTF8 (also tried AMERICAN_AMERICA.UTF8, AMERICAN_AMERICA.AL32UTF8.). After i made changes in connection.cpp it started work. :)

@@ -795,12 +795,13 @@ void Connection::handleResult(ExecuteBaton* baton, Handle<Value> (&argv)[2]) {
output->clobVal.open(oracle::occi::OCCI_LOB_READONLY);
oracle::occi::Stream* instream = output->clobVal.getStream(1,0);
size_t chunkSize = output->clobVal.getChunkSize();
char *buffer = new char[chunkSize];
char *buffer = new char[chunkSize + 1];
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not enough size

@realityfilter
Copy link

I think this problem might have something todo with bugfix of pull request #198.

Currently reading a clob is broken because the whole buffer gets appended to the result string regardless of the read count.

@johannish
Copy link
Collaborator

@piraman I've just merged #198. Would you please try it from master and see if it fixes your issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants